package weixin.init;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import weixin.service.WechatService;
import weixin.utils.BaseUtils;

@Component
public class InitWechat implements ApplicationListener<ContextRefreshedEvent>{
	@Autowired
	private WechatService wechatService;
	@Override
	public void onApplicationEvent(ContextRefreshedEvent paramE) {
		wechatService.initWechat();//初始化各种参数
		BaseUtils.setWechatService(wechatService);//给baseUtils使用
	}

}
